<form id="edit-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('计划编码')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-plan_code" class="form-control" name="row[plan_code]" type="text" value="{$row.plan_code}" readonly>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('计划名称')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-plan_name" class="form-control" name="row[plan_name]" type="text" value="{$row.plan_name}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('关联订单')}:</label>
        <div class="col-xs-12 col-sm-8">
            <select id="c-order_id" data-rule="required" class="form-control selectpicker" name="row[order_id]" data-live-search="true">
                <option value="">请选择订单</option>
                {foreach $orderList as $id => $orderName}
                <option value="{$id}" {if $row.order_id == $id}selected{/if}>{$orderName}</option>
                {/foreach}
            </select>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('产品名称')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-product_name" class="form-control" name="row[product_name]" type="text" value="{$row.product_name}" readonly>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('产品型号')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-product_model" class="form-control" name="row[product_model]" type="text" value="{$row.product_model}" readonly>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('计划数量')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-planned_quantity" data-rule="required;number" class="form-control" name="row[planned_quantity]" type="number" value="{$row.total_quantity}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('实际数量')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-actual_quantity" class="form-control" name="row[actual_quantity]" type="number" value="{$row.actual_quantity|default='0'}" readonly>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('计划开始时间')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-planned_start_time" data-rule="required" class="form-control datetimepicker" name="row[planned_start_time]" type="text" value="{$row.planned_start_time|intval|date='Y-m-d H:i:s',###}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('计划结束时间')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-planned_end_time" data-rule="required" class="form-control datetimepicker" name="row[planned_end_time]" type="text" value="{$row.planned_end_time|intval|date='Y-m-d H:i:s',###}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('实际开始时间')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-actual_start_time" class="form-control datetimepicker" name="row[actual_start_time]" type="text" value="{$row.actual_start_time|intval|date='Y-m-d H:i:s',###}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('实际结束时间')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-actual_end_time" class="form-control datetimepicker" name="row[actual_end_time]" type="text" value="{$row.actual_end_time|intval|date='Y-m-d H:i:s',###}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('工序顺序')}:</label>
        <div class="col-xs-12 col-sm-8">
            <textarea id="c-process_sequence" class="form-control" name="row[process_sequence]" rows="3" placeholder="工序顺序，如：下料→拉伸→焊接→抛光→组装→质检">{$row.process_sequence|default=''}</textarea>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('关键节点')}:</label>
        <div class="col-xs-12 col-sm-8">
            <textarea id="c-key_milestones" class="form-control" name="row[key_milestones]" rows="3" placeholder="关键生产节点，如：工序衔接时间、质检时间">{$row.key_milestones|default=''}</textarea>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('完成进度')}:</label>
        <div class="col-xs-12 col-sm-8">
            <div class="input-group">
                <input id="c-progress" class="form-control" name="row[progress]" type="number" value="{$row.progress|default='0'}" min="0" max="100" step="0.01">
                <span class="input-group-addon">%</span>
            </div>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('状态')}:</label>
        <div class="col-xs-12 col-sm-8">
            <select id="c-status" class="form-control selectpicker" name="row[status]">
                <option value="0" {if $row.status == 0}selected{/if}>{:__('草稿')}</option>
                <option value="1" {if $row.status == 1}selected{/if}>{:__('已审核')}</option>
                <option value="2" {if $row.status == 2}selected{/if}>{:__('进行中')}</option>
                <option value="3" {if $row.status == 3}selected{/if}>{:__('已完成')}</option>
                <option value="4" {if $row.status == 4}selected{/if}>{:__('已取消')}</option>
            </select>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('备注')}:</label>
        <div class="col-xs-12 col-sm-8">
            <textarea id="c-remark" class="form-control" name="row[remark]" rows="3">{$row.remark}</textarea>
        </div>
    </div>
    <div class="form-group layer-footer">
        <label class="control-label col-xs-12 col-sm-2"></label>
        <div class="col-xs-12 col-sm-8">
            <button type="submit" class="btn btn-success btn-embossed disabled">{:__('OK')}</button>
            <button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
        </div>
    </div>
</form>
